// 计算数组的交集
export function intersection(a: any[], b: any[]) {
    return a.filter(value => b.includes(value));
}

// 计算数组的并集
export function union(a: any[], b: any[]) {
    return [...new Set([...a, ...b])];
}

// 计算数组的差集 (a - b)
export function difference(a: any[], b: any[]) {
    return a.filter(value => !b.includes(value));
}
